import { createRouter, createWebHistory, RouteRecordRaw } from 'vue-router'
const routes: Array<RouteRecordRaw> = [
  {
    path: '/',
    name: 'ProductUpdate',
    // component: () => import('../views/Loading.vue')
    //component: () => import('@/components/Helloworld.vue')
    component: () => import('../views/Loadings.vue')
    // component: () => import('@/components/produc/ProductUpdate.vue')
    // component: () => import('@/components/newIndex/index.vue')
  },
  {
    path: '/Loading',
    name: 'Loading',
    component: () => import('../views/Loadings.vue')
  },
  {
    path: '/Home',
    name: 'Home',
    component: () => import('../views/Home.vue'),
    children: [
      //首页
      {
        path: '/HomePage',
        name: 'HomePage',
        component: () => import('../views/HomePage.vue'),
      },
      //实训任务
      {
        path: '/SimulationTasks',
        name: 'SimulationTasks',
        component: () => import('../views/SimulationTasks.vue'),
      },
      //成绩
      {
        path: '/ResuAlls',
        name: 'ResuAlls',
        component: () => import('../views/ResuAlls.vue'),
      },
      //班级管理
      {
        path: '/ClassManagement',
        name: 'ClassManagement',
        component: () => import('../views/ClassManagement.vue'),
      },
      //产品库
      {
        path: '/ProductLibrary',
        name: 'ProductLibrary',
        component: () => import('../views/ProductLibrary.vue'),
      },
      //教学资源
      {
        path: '/TeachingResources',
        name: 'TeachingResources',
        component: () => import('../views/TeachingResources.vue'),
      },
      //比赛模块
      {
        path: '/Match',
        name: 'Match',
        component: () => import('../views/Match.vue'),
      },
      {
        path: '/Table',
        name: 'Table',
        component: () => import('../views/Table.vue'),
      },
      //单机
      {
        path:'/StandaloneMenu',
        name:'StandaloneMenu',
        component:() => import('../views/StandaloneMenu.vue')
      }
    ],
  },
]

const router = createRouter({
  history: createWebHistory(process.env.BASE_URL),
  routes
})

export default router
